package com.vitabuybuy.tv.network

import com.library.common.net.NetUrl
import com.vitabuybuy.tv.dto.AgreementDto


import rxhttp.IAwait
import rxhttp.wrapper.param.RxHttp
import rxhttp.wrapper.param.toResponse

/**
 * 作者：SimGa
 * 日期：2020/12/3
 * 时间：17:04
 * 包名：com.vitabuybuy.tv.network
 */
object SettingRepository {

    fun getHelpCenterList(): IAwait<MutableList<AgreementDto>> {
        return RxHttp.postJson(NetUrl.api_help_center_list)
            .add("label", "help").toResponse()
    }

    fun saveFeelBack(content: String): IAwait<String> {
        return RxHttp.postJson(NetUrl.api_feel_back)
            .add("feedback", mapOf(Pair("content", content))).toResponse()
    }

    fun getServicePhone(): IAwait<String> {
        return RxHttp.postJson(NetUrl.api_service_phone).toResponse()
    }
}